/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.shinyray.project.entity;

import com.shinyray.org.entity.Orgnization;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Temporal;

/**
 * 合作协议的签出信息。签出是指将协议送交其他机构进行确认处理的过程。
 * @author Administrator
 */
@Entity
public class CPPSignOut implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    //签出人帐号
    private String signerAccount;
    //签出人姓名
    private String signerName;
    //签出协议的来源机构
    @ManyToOne
    private Orgnization fromOrg;
    //签出协议的目的机构
    @ManyToOne
    private Orgnization toOrg;
    //签出时间
    @Temporal(javax.persistence.TemporalType.DATE)
    private Date signOutDate;
    //联系人
    private String contactorName;
    //联系电话
    private String contactorPhone;
    //备注
    private String comments;
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof CPPSignOut)) {
            return false;
        }
        CPPSignOut other = (CPPSignOut) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.shinyray.project.entity.CPPSignOut[id=" + id + "]";
    }

    public String getComments() {
        return comments;
    }

    public void setComments(String comments) {
        this.comments = comments;
    }

    public String getContactorName() {
        return contactorName;
    }

    public void setContactorName(String contactorName) {
        this.contactorName = contactorName;
    }

    public String getContactorPhone() {
        return contactorPhone;
    }

    public void setContactorPhone(String contactorPhone) {
        this.contactorPhone = contactorPhone;
    }

    public Orgnization getFromOrg() {
        return fromOrg;
    }

    public void setFromOrg(Orgnization fromOrg) {
        this.fromOrg = fromOrg;
    }

    public Date getSignOutDate() {
        return signOutDate;
    }

    public void setSignOutDate(Date signOutDate) {
        this.signOutDate = signOutDate;
    }

    public String getSignerAccount() {
        return signerAccount;
    }

    public void setSignerAccount(String signerAccount) {
        this.signerAccount = signerAccount;
    }

    public String getSignerName() {
        return signerName;
    }

    public void setSignerName(String signerName) {
        this.signerName = signerName;
    }

    public Orgnization getToOrg() {
        return toOrg;
    }

    public void setToOrg(Orgnization toOrg) {
        this.toOrg = toOrg;
    }

}
